package cn.mrcode.fd.blog.interceptor;

import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * redis session共享拦截器
 * @author zhuqiang
 * @version V1.0
 * @date 2016/7/19 0019 10:26
 */
public class RedisSessionInterceptor extends HandlerInterceptorAdapter{
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        System.out.println("sss");
        if(handler instanceof DefaultServletHttpRequestHandler){
            return super.preHandle(request, response, handler);
        }
        return super.preHandle(request, response, handler);
    }
}
